package com.cityp.bean;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.context.annotation.Bean;

/**
 * @ClassName: ResultBean
 * @Description:
 * @author: Kowk
 * @since:1.0.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ResultBean {
    private int code;
    private String msg;
    private  Object data;

    public static ResultBean success(String msg){
        return new ResultBean(200,msg,null);
    }

    public static ResultBean success(String msg,Object data){
        return new ResultBean(200,msg,data);
    }

    public static ResultBean err(String msg){
        return new ResultBean(500,msg,null);
    }

    public static ResultBean err(String msg,Object data){
        return new ResultBean(500,msg,data);
    }
}
